-
Notifications
You must be signed in to change notification settings - Fork 161
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: feed oracle with meTokens price every endBlock #2316
Conversation
kosegor
commented
Nov 7, 2023
- Sends every meToken price each endBlock to x/oracle
- Avoid adding meTokens to x/oracle accept list when they are added to x/leverage registry. This is done to exclude validators from reporting and voting on the price, as well as being slashing for not reporting it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Check to see if GetExchangeRate works in oracle module.
(It might not know the symbol denom <-> base denom relationship for metokens)
@@ -11,5 +11,6 @@ | |||
func EndBlocker(k keeper.Keeper) []abci.ValidatorUpdate { | |||
util.Panic(k.ClaimLeverageInterest()) | |||
util.Panic(k.RebalanceReserves()) | |||
util.Panic(k.SetPricesToOracle()) |
Check warning
Code scanning / CodeQL
Panic in BeginBock or EndBlock consensus methods Warning
@@ -11,5 +11,6 @@ | |||
func EndBlocker(k keeper.Keeper) []abci.ValidatorUpdate { | |||
util.Panic(k.ClaimLeverageInterest()) | |||
util.Panic(k.RebalanceReserves()) | |||
util.Panic(k.SetPricesToOracle()) |
Check warning
Code scanning / CodeQL
Panic in BeginBock or EndBlock consensus methods Warning
path flow from Begin/EndBlock to a panic call
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #2316 +/- ##
==========================================
- Coverage 75.38% 70.48% -4.91%
==========================================
Files 100 170 +70
Lines 8025 12902 +4877
==========================================
+ Hits 6050 9094 +3044
- Misses 1589 3203 +1614
- Partials 386 605 +219
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
utACK. Did you check if we need to check slashing condition in oracle? We don't want oracle module to both:
- require validators to submit meToken prices
- slash them if they don't submit
Yes, I checked it with Adam and oracle team. After the token is added to leverage registry we are NOT adding it to oracle accept list. |